package com.geeksx.trainer.common.exception;

/**
 * Copyright (C), 2025, 北京同创永益科技发展有限公司
 *
 * @Classname BusinessException
 * @Description TODO
 * @Date 2025/9/12 10:10
 * @Created by zhengkaixuan
 */
public class BusinessException extends RuntimeException{

    private final int code;

    private final String message;

    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BusinessException(String message) {
        this(500, message);
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
